# Name: Xueyan Lyu
import matplotlib.pyplot as plt
import pandas as pd

# read csv file
pr = pd.read_csv("owid-covid-data.csv")
# select data
selected_data = []
for i in range(len(pr)):
    line = pr.iloc[i]
    if str(line['date']) == r'2021-01-01':
        selected_data.append({'country': line['location'], 'new': line['new_cases']})
# prepare index and values for the bar plot
index=[]
values=[]
for data in selected_data:
    if data['country'] in ['Canada', 'France', 'United Kingdom', 'United States', 'India', 'Germany']:
        index.append(data['country'])
        values.append(data['new'])
# draw the bar plot
plt.bar(index,values)
plt.show()